﻿using CPPEI.Coolzon.Common;
using CPPEI.Coolzon.Event.NCL;
using CPPEI.Coolzon.Service.Contract;
using Sunboxsoft.ChanceData.ServiceProxy.MainServiceRef;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CPPEI.Coolzon.UI.Views.EventProxies
{
    public class RespShowLaserPointerHandler : BaseResponseHandler<RespShowLaserPointerData>
    {
        protected override void OnHandle(RemoteEventProxy remoteEventProxy, Response response, RespShowLaserPointerData responseData)
        {
            NCLShowLaserPointerEvent @event = new NCLShowLaserPointerEvent(
                responseData.IsShow,
                responseData.SceneName,
                responseData.Color,
                responseData.DestPointX,
                responseData.DestPointY,
                responseData.DestRadius,
                responseData.Duration);
            @event.State = NCLEventState.Finished;
            NCLEventBus.PublishAsync(@event);

            //if (responseData.IsShow)
            //{
            //    //// 显示激光笔
            //    //remoteEventProxy.RenderView.ShowLaserPointer(new System.Windows.Point(responseData.DestPointX, responseData.DestPointY),
            //    //    responseData.DestRadius,
            //    //    responseData.Duration,
            //    //    responseData.Color);
            //}
            //else
            //{
            //    //// 关闭激光笔
            //    //remoteEventProxy.RenderView.HideLaserPointer();
            //}
        }
    }
}
